<!--
@author RickoNoNo3
纯脚本页面
-->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover" />
		<script src="../../Common/js/lib/jquery-3.4.1.min.js"></script>
		<script src="../../Common/js/tools.js"></script>
		<script src="../../Common/js/jump.js"></script>
	</head>
</html>
<script>
	var userInfo;
	document.addEventListener('plusready', function() {
		userInfo = JSON.parse(plus.storage.getItem("userInfo"));
		if (userInfo !== null) {
			JumpToSelectEdu(userInfo['uEduId'], '../../');
		} else {
			ThisClose();
		}
		// 注意这里有内存泄漏, 万一一直没调用getEduId的话.
	});

	function getEduId(eduId) {
		CallAJAX('setEdu', {
			'userHash': plus.storage.getItem("userHash"),
			'eduId': eduId
		}, function(data) {
			console.log("EduId change to " + eduId);
			ThisClose();
		}, function error() {
			console.log("EduId change failed.");
			ThisClose();
		});
	}
</script>
